<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>网易云音乐</title>
  <link rel="shortcut icon" href="images/favicon.ico">
  <!-- 样式 -->
  <link rel="stylesheet" href="./css/index.css">
</head>

<body>
  <div class="wrap" id="box">
    <div class="play_wrap" id="player">
      <div class="search_bar">
        <img src="images/player_title.png" alt="" />
        <!-- 搜索歌曲 -->
        <label>
          <input type="text" autocomplete="off" placeholder="音乐/视频/电台/用户" v-model='query' @keyup.enter="searchMusic()" />
          <button @click="searchMusic"></button>
        </label>
      </div>
      <div class="center_con">
        <!-- 搜索歌曲列表 -->
        <div class='song_wrapper' >
          <ul class="song_list">
            <li v-for="item in musicList">
              <!-- 点击播放歌 -->
              <a href="javascript:;" @click="playMusic(item.id)"></a>
              <b>{{ item.name }}</b>
              <span v-if="item.mvid != 0" @click="playMV(item.mvid)">
                <i></i>
              </span>
            </li>
          </ul>
          <img src="images/line.png" class="switch_btn" alt="">
        </div>
        <!-- 歌曲信息容器 -->
        <div class="player_con" :class="{ playing:isPlaying }">
          <img src="images/player_bar.png" class="play_bar" alt="" />
          <!-- 黑胶碟片 -->
          <span class="name">{{ songName }}</span>
          <img src="images/disc.png" class="disc autoRotate" alt="" />
          <img :src="musicCover ==''?'./images/cover.png':musicCover"  class="cover autoRotate" alt="" />
            <div class="lyric">
                <span v-for="lrc in lyric">{{ lrc.toString().substring(11,)  }}<br></span>
            </div>
        </div>
        <!-- 评论容器 -->
        <div class="comment_wrapper" >
          <h5 class='title'>热门留言</h5>
          <div class='comment_list'>
            <dl v-for="item in hotComments">
              <dt><img :src="item.user.avatarUrl" alt=""></dt>
              <dd class="name">{{ item.nickname }}</dd>
              <dd class="detail">{{ item.content }}</dd>
            </dl>
          </div>
          <img src="images/line.png" class="right_line" alt="" />
        </div>
      </div>
      <div class="audio_con">
        <audio ref="audio" :src="musicUrl"  @play="play" @pause="pause" controls autoplay loop class="myaudio"></audio>
      </div>
      <div class="video_con" v-show="isShow"  style="display:none;">
        <video :src="mvUrl" controls="controls"></video>
        <div class="mask" @click="hide"></div>
      </div>
    </div>
  </div>
  <!-- 引入 vue.js  -->
  <script src="js/vue.js"></script>
  <!-- 引入 axios.js  -->
  <script src="js/axios.min.js"></script>
  <script src="js/main.js"></script>
</body>

</html>